<%-- 
    Document   : resume
    Created on : Apr 26, 2012, 5:38:12 AM
    Author     : Ravindra
--%>

<%@page import="jobportal.Dbconn"%>
<%@page import="java.sql.*" %>

<%
//String uname="MCA/B09/05";
            Connection con = null;
            Statement st = null;
            ResultSet rs = null;

            String resumetitle = "", name = "", gender = "", dob = "", nationality = "", address = "", city = "", state = "", pin = "", contact = "", email = "", mailstatus = "", status = "";
            String employer = "", industry = "", role = "", salary = "0", exp = "0";
            String des_industry = "", des_fun_area = "", des_keyskill = "", des_salary = "";
            String date = "", title = "", textresume = "";
            boolean file = false;
            try {
                con = Dbconn.getConn();
                st = con.createStatement();

                String sql = "select * from student where username='" + uname + "'";
                rs = st.executeQuery(sql);
                if (rs.next()) {
                    name = rs.getString("name");
                    gender = rs.getString("gender");
                    dob = rs.getString("dob");
                    address = rs.getString("address");
                    email = rs.getString("email");
                    city = rs.getString("city");
                    state = rs.getString("state");
                    pin = rs.getString("pin");
                    contact = rs.getString("contact");
                    nationality = rs.getString("nationality");
                    mailstatus = rs.getString("emailstatus");
                }
                sql = "select * from exprience where username='" + uname + "'";
                rs = st.executeQuery(sql);
                if (rs.next()) {
                    employer = rs.getString("employer");
                    industry = rs.getString("industry");
                    role = rs.getString("role");
                    salary = rs.getString("salary");
                    exp = rs.getString("exp");
                }
                sql = "select * from desiredjob where username='" + uname + "'";
                rs = st.executeQuery(sql);
                if (rs.next()) {
                    des_industry = rs.getString("industry");
                    des_fun_area = rs.getString("fun_area");
                    des_salary = rs.getString("salary");
                    des_keyskill = rs.getString("keyskill");
                }
                sql = "select title, DATE_FORMAT(date,'%W  %d-%b-%Y') as date,textresume,file from resume where username='" + uname + "'";
                rs = st.executeQuery(sql);
                if (rs.next()) {
                    if (rs.getString("title") != null) {
                        title = rs.getString("title");
                    }
                    if (rs.getString("date") != null) {
                        date = rs.getString("date");
                    }
                    if (rs.getString("textresume") != null) {
                        textresume = rs.getString("textresume");
                    }
                    if (rs.getString("file") != null) {
                        file = true;
                    }
                }
                sql = "select * from education where username='" + uname + "' order by year desc";
                rs = st.executeQuery(sql);
            } catch (Exception e) {
                out.println("Exception::" + e);
            }

try{
%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr><td class="messagesred">
        </td></tr>

    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>
            <div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" >

                    <tr>
                        <td width="72%" ><span class="mainheading_js">My  Resume</span></td>
                    </tr>
                </table>
                <img src="../images/blank.gif" alt="blank" width="18" height="10" border="0" /><br>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">

                    <tr>
                        <td colspan="2">
                            <table width="100%" cellpadding="0" cellspacing="0" class="tbl_bdr">

                                <tr class="sde_mnu_hdr_blue" align="center">
                                    <td  height="29" valign="middle"><strong>Resume Title</strong> </td>
                                    <td   valign="middle"><strong>Posted on </strong></td>
                                    <td  valign="middle"><strong>Action</strong></td>
                                </tr>

                                <tr align="center">
                                    <td height="28"  valign="middle"  style="padding-left:5px;"><%=title%></td>
                                    <td  valign="middle"  style="padding-left:5px;"><%=date%> </td>
                                    <td align="center" valign="middle"  style="padding-left:5px;">
                                        <%if (file) {%>
                                        <a href="../src/resume_down.jsp?id=<%=uname%>&table=resume&col=file&pk_col=username" class="link" ><strong>Download</strong></a>
                                        <%} else {%>Not Available<%}%>
                                    </td>
                                </tr>


                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>

                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>
                    <tr>
                        <td width="50%" height="20" align="center" valign="top" style="padding-left:5px; padding-left:5px;">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                                <tr>
                                    <td height="20" colspan="5" align="left" style="padding-left:5px;" class="sde_mnu_hdr_blue" ><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/><strong>General Details </strong> </td>
                                </tr>
                                <tr>
                                    <td width="6%" height="20"  style="padding-left:5px;">&nbsp;</td>
                                    <td width="27%" align="left"  style="padding-left:2px;">Resume Title</td>
                                    <td width="3%" align="center" >:</td>
                                    <td width="41%" align="left"  style="padding-left:5px; text-transform:capitalize;"><span style="padding-left:5px;"><%=resumetitle%></span></td>
                                    <td width="23%" rowspan="5" align="center" valign="top"  style="padding-left:1px; padding-right:5px;">
                                        <img src="../src/getpic.jsp?id=<%=uname%>&table=student&col=photo&pk_col=username" width="93" height="99" border="0" /></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Name</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=name%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Gender</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=gender%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">DOB</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=dob%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Nationality</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=nationality%></td>
                                </tr>
                            </table>
                        </td>
                        <td width="50%" align="center" valign="top" style="padding-left:5px; padding-left:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                                <tr>
                                    <td height="20" colspan="4" align="left" class="sde_mnu_hdr_blue" style="padding-left:5px;"><strong><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/>Contact  Details </strong> </td>
                                </tr>
                                <tr>
                                    <td width="6%" height="20"  style="padding-left:5px;">&nbsp;</td>
                                    <td width="22%" align="left"  style="padding-left:2px;">Address</td>
                                    <td width="4%" align="center" >:</td>
                                    <td width="68%" align="left"  style="padding-left:5px;"><%=address%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">&nbsp;</td>
                                    <td align="center" >&nbsp;</td>
                                    <td align="left"  style="padding-left:5px;"><%=city%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">&nbsp;</td>
                                    <td align="center" >&nbsp;</td>
                                    <td align="left"  style="padding-left:5px;"><%=state%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">&nbsp;</td>
                                    <td align="center" >&nbsp;</td>
                                    <td align="left"  style="padding-left:5px;">Pin: <%=pin%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Email</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=email%><%if (!mailstatus.equalsIgnoreCase("Verified")) {%><img src="../images/i_error.gif" /><%} else {%><img src="../images/ok.png" width="12" height="12"> <%}%></td>
                                </tr>

                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Mobile</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=contact%> </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>

                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>
                    <tr>
                        <td height="20" align="center" valign="top" style="padding-left:5px; padding-left:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                                <tr>
                                    <td height="20" colspan="4" align="left" class="sde_mnu_hdr_blue" style="padding-left:5px;"><strong><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/>Previous Employment Details </strong> </td>
                                </tr>
                                <tr>
                                    <td width="5%" height="20"  style="padding-left:5px;">&nbsp;</td>
                                    <td width="39%" align="left"  style="padding-left:2px;"> Employer</td>
                                    <td width="3%" align="center" >:</td>
                                    <td width="53%" align="left"  style="padding-left:5px;"><%=employer%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;"> Industry</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=industry%></td>
                                </tr>

                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;"> Job Role</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=role%></td>
                                </tr>

                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;"> Annual Salary</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px; text-transform:capitalize;"><span style="padding-left:5px;"><span style="padding-left:5px;vertical-align:middle"><img src="../images/rupee.jpg" width="16" height="17"/></span><%=salary%> INR.</span></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Total Year of Experience </td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=exp%> in Years.</td>
                                </tr>

                            </table></td>
                        <td align="center" valign="top" style="padding-left:5px; padding-left:5px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                                <tr>
                                    <td height="20" colspan="4" align="left" class="sde_mnu_hdr_blue" style="padding-left:5px;"><strong><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/>Desired Employment Details </strong> </td>
                                </tr>
                                <tr>
                                    <td width="5%" height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td width="39%" height="22" align="left"  style="padding-left:2px;">Desired Industry </td>
                                    <td width="3%" align="center" >:</td>
                                    <td width="53%" align="left"  style="padding-left:5px;"><%=des_industry%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Desired Functional Area</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=des_fun_area%></td>
                                </tr>
                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Key Skills </td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px;"><%=des_keyskill%></td>
                                </tr>

                                <tr>
                                    <td height="22"  style="padding-left:5px;">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;">Desired Annual Salary</td>
                                    <td align="center" >:</td>
                                    <td align="left"  style="padding-left:5px; text-transform:capitalize;">Anually<span style="padding-left:5px;vertical-align:middle"><img src="../images/rupee.jpg" width="16" height="17"/></span> <span style="padding-left:5px;"><%=des_salary%></span></td>
                                </tr>

                            </table></td>
                    </tr>
                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>

                    <tr>
                        <td height="5" colspan="2" align="center" valign="middle"></td>
                    </tr>
                    <div style="padding-top:15px;"><!-- --></div>
                    <tr>
                        <td height="20" align="center" valign="top" style="padding-left:5px; padding-left:5px;" colspan="2">



                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                                <tr>
                                    <td height="20" colspan="4" align="left" class="sde_mnu_hdr_blue" style="padding-left:5px;"><strong><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/>Academic   Details </strong> </td>
                                </tr>

                                <tr>
                                    <td height="22"  style="padding-left:5px;" width="3%">&nbsp;</td>
                                    <td height="22" align="left"  style="padding-left:2px;" colspan="2"><table width="100%" border="0" cellspacing="0" style="text-align:center" class="tbl_bdr medium_font">
                                            <tr class="sde_mnu_hdr_blue" style="background-color: lightskyblue">
                                                <td>course</td>
                                                <td>university/school</td>
                                                <td>stream</td>
                                                <td>year</td>
                                                <td>% Marks </td>
                                            </tr>
                                            <%while (rs.next()) {%>
                                            <tr>
                                                <td><%=rs.getString("course")%></td>
                                                <td><%=rs.getString("univ")%></td>
                                                <td><%=rs.getString("stream")%></td>
                                                <td><%=rs.getString("year")%></td>
                                                <td><%=rs.getString("marks")%>%</td>
                                            </tr>
                                            <%}%>
                                            <tr class="sde_mnu_hdr_blue" style="background-color: lightskyblue">
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                                <td>&nbsp;</td>
                                            </tr>
                                        </table></td>
                                    <td height="22" align="left"  style="padding-left:2px;" width="3%">&nbsp;</td>
                                </tr>
                                <tr><td>&nbsp;</td></tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div></td>
    </tr>
    <tr>
        <td height="5" colspan="2" align="center" valign="middle"></td>
    </tr>

    <tr>
        <td height="5" colspan="2" align="center" valign="middle"></td>
    </tr>
    <tr>
        <td colspan="2">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr medium_font">
                <tr>
                    <td height="20" colspan="4" align="left" style="padding-left:5px;" class="sde_mnu_hdr_blue" ><img style="margin-top:2px; margin-left:-2px;" src="../images/top_left.gif"; class="sde_mnu_img2"/><strong>Text Resume: </strong> </td>
                </tr>
                <tr>
                    <td width="20" height="20"  style="padding-left:5px;">&nbsp;</td>
                    <td  align="left"  style="padding-left:2px;"><%=textresume%></td>
                </tr>


            </table>

        </td>
    </tr>
</table>

<%
}catch(Exception e){
    out.println(e);
}
%>